import React from 'react'

class BillSettingTools extends React.Component {
  constructor(props){
    super(props)
  }


  onSearchClick(event) {
    var username = $(event.target).val();

    this.props.onDataSearch(username);
  }

  render(){
    return (
      <div className="bill-role-tools row">

        <div className="col-xs-offset-4 col-sm-offset-4 col-lg-offset-5 col-xs-5 col-sm-5 col-lg-4 create-button ">
          <button type="button" className="btn-push" onClick={(event)=>this.props.onPushAll()}>
          推送全部
          </button>
          <input id="input-upload" className="local_btn" type="file" onChange={(event)=>this.props.onCSVSelect(event)}/>
          <button type="button" className="btn-upload">上传CSV</button>
          <button type="button" className="btn-create f-dn"
                onClick={(event)=>this.props.onCreateClick()}>添加</button>
        </div>
        <div className="col-sm-3 col-xs-3">
          <div className="input-group search-group">
            <i className="ti-search"></i>
            <input ref='bill_number' type="text" className="form-control" placeholder="请搜索户号"
                  onChange={(event)=>this.onSearchClick(event)}/>
          </div>
        </div>

      </div>
    )
  }
}

export default BillSettingTools
